//
//  addBtnCell.m
//  Estate
//
//  Created by heyong on 16/6/17.
//  Copyright © 2016年 ttsx. All rights reserved.
//

#import "addBtnCell.h"

@implementation addBtnCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        UIButton *btn=[[UIButton alloc]initWithFrame:CGRECTS(5, 0, 367, 40)];
        [btn setTitle:@"添加" forState:UIControlStateNormal];
        [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        btn.backgroundColor=[UIColor colorWithRed:0.84 green:0.84 blue:0.84 alpha:1.00];
        [btn addTarget:self action:@selector(addAction) forControlEvents:UIControlEventTouchUpInside];
        [self.contentView addSubview:btn];
    }
    return self;
}

- (void)addAction{
    if(self.addBlock){
        self.addBlock();
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
